import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import { Home } from '../pages/home'
import { Login } from '../pages/login'
import { First } from '../pages/first'
import { Detail } from '../pages/detail'
import { NotFind } from '../pages/404'

export function MyRouter () {
  return <Router>
    <Switch>
      <Route component={Home} path='/' exact/>
      <Route component={Login} path='/login'/>
      <Route component={First} path='/first'/>
      <Route component={Detail} path='/detail/:id'/>
      <Route component={NotFind} path='*'/>
      {/*<Route component={First} path='/first' exact><Redirect to={'/login'}/></Route>*/}
    </Switch>
  </Router>

}